<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ckeditor
 *
 * @author jblew
 */
App::import('Vendor', 'ckeditor');

class CKEditorHelper extends AppHelper {
    var $helpers = Array('Html', 'Javascript');

    public function  __construct() {
        parent::__construct();
    }

    public function load($id) {
        $did = '';
        foreach (explode('.', $id) as $v) {
            $did .= ucfirst($v);
        }

        $code = "CKEDITOR.replace( '".$did."' );";
        return $this->Javascript->codeBlock($code);
    }
}
?>
